import request from '../utils/request'
//HOME
/* export function HomeList(params: any) {
   return request({
      url: '/HomeList',
      method: 'get',
      params
   })
} */

export function HomeList(params: any) {
   return request({
      url: '/HomeList',
      method: 'get',
      params
    })
}
export function MockList(params: any) {
   return request({
      url: '/MockList',
      method: 'get',
      params
   })
}
export function MockListDel(params: { id: string }) {
   return request({
      url: '/del',
      method: 'post',
      data: params
   })
}
export function MockListAdd(params: any) {
   return request({
      url: '/add',
      method: 'post',
      data: params
   })
}

export function getList(params: any) {
   return request({
      url: '/getProList',
      method: 'get',
      params
   })
}

// 注册
export const registered = (params: any) => request.post("/registered", params)
// 登录
export const loginApi = (params: any) => request.post("loginApi", params)

// 测试
export function ChengSaiJie(params: any) {
   return request({
      url: '/ChengSaiJie',
      method: 'get',
      params
   })
}
// export const loginApi = (params: any) => request.post("loginApi", params)

// 获取用户,根据token得到用户角色
export const getUserRole = (params: any) => request.post("getUserRole", params)

//添加药品请求
// export function addDrug(params: any) {
//    return request({
//       url: '/addDrugs',
//       method: 'post',
//       data: params
//    })
// }

export const addDrug = (params: any) => request.post("/addDrugs", params)

export const cheng = (params: any) => request.post("/saijie", params)
